import { AxiosPromise } from 'axios'
// @ts-ignore
import request from '/@/utils/request'

const prefix = '/api/dms/credit/'

// 客户信用档案管理列表
export const crediList: (data: object) => AxiosPromise = (data) =>
  request(`${prefix}list`, { data })

  // 信用档案固定筛选项
export const crediSearch: () => AxiosPromise = () =>
    request(`${prefix}search`)

// 信用档案下拉筛选项
export const crediPullDown: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}pullDown`, { data })

// 信用档案-草稿箱
export const creditDraftList: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}draftList`, { data })

// 撤回审核
export const crediRevokeExamine: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}revokeExamine`, { data })

// 添加信用档案
export const crediCreate: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}create`, { data })
    
// 信用档案详情
export const crediInfo: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}info`, { data })

// 客户信用档案详情
export const crediCustomerInfo: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}customerInfo`, { data })

// 信用档案更新
export const crediUpdate: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}update`, { data })

// 信用额度变更
export const crediChangeAmount: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}changeAmount`, { data })

// 申请临时信用额度
export const crediTempAmount: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}tempAmount`, { data })
    
// 信用档案变更记录
export const crediOperateLog: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}operateLog`, { data })

// 信用档案变更记录
export const crediPossessList: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}possessList`, { data })

// 临时信用档案列表
export const crediTempList: (data: object) => AxiosPromise = (data) =>
    request(`${prefix}tempList`, { data })

// 集团或子公司选项
export const customerOptionsList: (data: object) => AxiosPromise = (data) =>
    request('/api/dms/customer/optionsList', { data })

    

    